-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy clean up dangling index metadata log entry #558
Merged
dai-chen
merged 8 commits into
opensearch-project:main
from
dai-chen:clean-up-dangling-metadata-log-entry
Oct 15, 2024
Merged
Lazy clean up dangling index metadata log entry #558
dai-chen
merged 8 commits into
opensearch-project:main
from
dai-chen:clean-up-dangling-metadata-log-entry
Oct 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dai-chen
force-pushed
the
clean-up-dangling-metadata-log-entry
branch
from
September 3, 2024 17:22
1753521
to
1aa3a31
Compare
dai-chen
force-pushed
the
clean-up-dangling-metadata-log-entry
branch
from
September 16, 2024 17:54
1aa3a31
to
808fe54
Compare
dai-chen
requested review from
rupal-bq,
vmmusings,
penghuo,
seankao-az,
anirudha,
kaituo and
YANG-DB
as code owners
September 18, 2024 16:28
dai-chen
force-pushed
the
clean-up-dangling-metadata-log-entry
branch
from
September 30, 2024 16:34
09c2e5c
to
a422c3f
Compare
noCharger
reviewed
Oct 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the PR also handle the issue where the create index fails with an opensearch timeout and the index status remains 'creating'?
seankao-az
approved these changes
Oct 14, 2024
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
Signed-off-by: Chen Dai <[email protected]>
dai-chen
force-pushed
the
clean-up-dangling-metadata-log-entry
branch
from
October 15, 2024 18:59
55d43d2
to
c2ab09f
Compare
dai-chen
commented
Oct 15, 2024
...ark-integration/src/main/scala/org/opensearch/flint/spark/FlintSparkTransactionSupport.scala
Show resolved
Hide resolved
noCharger
approved these changes
Oct 15, 2024
flint-spark-integration/src/main/scala/org/opensearch/flint/spark/FlintSparkIndexMonitor.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Chen Dai <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a lazy approach to handling potentially corrupted indices. Previously only
recoverIndex
API has such capability introduced in #241 and this PR makes this logic generic across all Flint APIs.A corrupted index is defined as a Flint index has an index log entry but no corresponding data index. Upon the next Flint API call, the system will check for such corrupted indices and perform the necessary cleanup, ensuring that users can recreate indices without encountering errors.
Typical Scenario
The most common scenario this PR aims to address is:
a. Before changes: the creation failed and require to remove the log entry manually
b. After changes: the log entry is cleaned up automatically and creation succeeds
Uncommon Scenarios and Handling
After step 1 above, user may rarely attempt to:
CREATING
orVACUUMIGN
state to reduce the possibility of race condition, ensuring log entry won't be removed mistakenly during ongoing operation.Example
Prepare corrupted Flint index:
Verify cleanup logic works:
Issues Resolved
#356
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.